@model IEnumerable<HooIzDat.Web.Models.LeaderboardEntry>

<div class="leaderboard">
    @if (Model.Count() > 0) {
    <table>
        <thead>
            <tr>
                <th>Player</th>
                <th>Won</th>
                <th>Questions</th>
            </tr>
        </thead>
        <tbody>
        @foreach (var item in Model) {
            <tr>
                <td>@item.Player.UserName</td>
                <td>@item.GamesWon</td>
                <td>@item.TotalQuestions</td>
            </tr>
        }
        </tbody>
    </table>
    }
    else {
    <p class="none">No games have been played yet!</p>
    }
</div>